package tests;

import common.Utils;
import org.openqa.selenium.By;

import java.util.Base64;

public class DetailsPage extends Utils {
    public static String url = "http://8.138.167.159:8080/blog_detail.html?blogId=8";
    public DetailsPage() {
        super(url);
    }

    /**
     * EditSucceed
     * 编辑是否成功
     */
    public void EditSucceed() {
        driver.findElement(By.cssSelector("body > div.container > div.right > div > div.operating > button:nth-child(1)")).click();
        driver.findElement(By.cssSelector("#submit"));
    }

    /**
     *deleteSucceed
     * 删除是否成功
     */
    public void deleteSucceed() {
        driver.findElement(By.cssSelector("body > div.container > div.right > div > div.operating > button:nth-child(2)")).click();
        solveAlertDismiss();
        driver.findElement(By.cssSelector("body > div.container > div.right > div > div.operating > button:nth-child(2)"));
    }

}
